import request from '@/utils/request'

// 查询banner广告图列表
export function listAds(query) {
  return request({
    url: '/banner/ads/list',
    method: 'get',
    params: query
  })
}

// 查询banner广告图详细
export function getAds(adsId) {
  return request({
    url: '/banner/ads/' + adsId,
    method: 'get'
  })
}

// 新增banner广告图
export function addAds(data) {
  return request({
    url: '/banner/ads',
    method: 'post',
    data: data
  })
}

// 修改banner广告图
export function updateAds(data) {
  return request({
    url: '/banner/ads',
    method: 'put',
    data: data
  })
}

// 删除banner广告图
export function delAds(adsId) {
  return request({
    url: '/banner/ads/' + adsId,
    method: 'delete'
  })
}
